let localUname=(new Date).getTime()>localStorage.getItem("loginExpires")? "":localStorage.getItem("uname")
let localToken=(new Date).getTime()>localStorage.getItem("loginExpires")? "":localStorage.getItem("token")
let sessionUname=sessionStorage.getItem("uname")
let sessionToken=sessionStorage.getItem("token")
let uname=localUname||sessionUname
let token=localToken||sessionToken
if(uname){
	document.write(`[<a href="user.html">${uname}</a>] [<a href="logout.html">退出</a>]`)
}else{
	document.write(`[<a href="login.html">登录</a>] [<a href="regist.html">免费注册</a>]`)
}